<div class="dash-row-header" ng-if="ctrl.row.showTitle || ctrl.row.collapse">
	<a class="dash-row-header-title" ng-click="ctrl.toggleCollapse()">
		<span class="dash-row-collapse-toggle pointer">
			<i class="fa fa-chevron-down" ng-show="!ctrl.row.collapse"></i>
			<i class="fa fa-chevron-right" ng-show="ctrl.row.collapse"></i>
		</span>
		<span ng-class="ctrl.row.titleSize">{{ctrl.row.title | interpolateTemplateVars:this}}</span>
	</a>
</div>

<div ng-if="ctrl.dropView === 1">
	<dash-row-add-panel row-ctrl="ctrl"></dash-row-add-panel>
</div>

<div ng-if="ctrl.dropView === 2">
	<dash-row-options row-ctrl="ctrl"></dash-row-options>
</div>

<div class="panels-wrapper" ng-if="!ctrl.row.collapse">
  <div class="dash-row-menu-container" data-click-hide ng-hide="ctrl.dashboard.meta.fullscreen">
    <ul class="dash-row-menu" role="menu">
      <li>
        <a ng-click="ctrl.toggleCollapse()">
          <i class="fa fa-minus"></i> Collapse
        </a>
      </li>
      <li ng-show="ctrl.dashboard.meta.canEdit">
        <a ng-click="ctrl.onMenuAddPanel()">
          <i class="fa fa-plus"></i> Add Panel
        </a>
      </li>
      <li ng-show="ctrl.dashboard.meta.canEdit">
        <a ng-click="ctrl.onMenuRowOptions()">
          <i class="fa fa-cog"></i> Row Options
        </a>
      </li>
      <li ng-show="ctrl.dashboard.meta.canEdit">
        <a ng-click="ctrl.moveRow(-1)">
          <i class="fa fa-arrow-up"></i> Move Up
        </a>
      </li>
      <li ng-show="ctrl.dashboard.meta.canEdit">
        <a ng-click="ctrl.moveRow(1)">
          <i class="fa fa-arrow-down"></i> Move Down
        </a>
      </li>
      <li ng-show="ctrl.dashboard.meta.canEdit">
        <a ng-click="ctrl.onMenuDeleteRow()">
          <i class="fa fa-trash"></i> Remove
        </a>
      </li>
    </ul>
    <div class="dash-row-menu-grip">
      <i class="fa fa-ellipsis-v"></i>
    </div>
  </div>

  <div ng-repeat="panel in ctrl.row.panels track by panel.id" class="panel" ui-draggable="!ctrl.dashboard.meta.fullscreen" drag="panel.id" ui-on-drop="ctrl.onDrop($data, panel)" drag-handle-class="drag-handle" panel-width>
    <plugin-component type="panel" class="panel-margin">
    </plugin-component>
  </div>

  <div panel-drop-zone class="panel panel-drop-zone" ui-on-drop="ctrl.onDrop($data)" data-drop="true">
    <div class="panel-margin">
      <div class="panel-container">
        <div class="panel-drop-zone-text"></div>
      </div>
    </div>
  </div>

  <div class="clearfix"></div>
</div>

